//
//  UIButton+Create.h
//  C2CMember
//
//  Created by yangy on 2018/7/2.
//  Copyright © 2018年 iphone. All rights reserved.
//

#import <UIKit/UIKit.h>


typedef NS_ENUM(NSInteger, YDImagePosition) {
    Left = 0,              //图片在左，文字在右，默认
    Right = 1,             //图片在右，文字在左
    Top = 2,               //图片在上，文字在下
    Bottom = 3,            //图片在下，文字在上
};

@interface UIButton (Create)

+ (UIButton*) cm_ButtonWithTitle:(NSString*) title
                            font:(UIFont*) font
                      titleColor:(UIColor*) titColor;

+ (UIButton*) cm_ButtonWithTitle:(NSString*) title
                            font:(UIFont*) font
                      titleColor:(UIColor*) titColor
                         bgColor:(UIColor*) bgColor;

+ (UIButton*) cm_ButtonWithTitle:(NSString*) title
                            font:(UIFont*) font
                      titleColor:(UIColor*) titColor
                         image:(UIImage*) normalImage;

/**设置图片位置,要先设置图片之后才能调用*/
- (void)setImagePosition:(YDImagePosition)postion spacing:(CGFloat)spacing;

@end
